import type { ButtonType } from '../types'

export function useButtonConfig() {
  // 按钮类型选项
  const buttonTypeOptions = [
    { label: '同意', value: 'agree' },
    { label: '拒绝', value: 'reject' },
    { label: '驳回', value: 'return' },
    { label: '撤销', value: 'revoke' },
    { label: '指派', value: 'delegate' },
    { label: '加签', value: 'addSign' },
    { label: '减签', value: 'reduceSign' },
    { label: '终止', value: 'terminate' },
    { label: '干预', value: 'intervene' },
  ]

  // 获取按钮类型的标签
  const getButtonTypeLabel = (type: ButtonType) => {
    return buttonTypeOptions.find((option) => option.value === type)?.label || ''
  }

  return {
    buttonTypeOptions,
    getButtonTypeLabel,
  }
}
